import { createApp } from 'vue'
import App from './App.vue'

// 导入css样式
import 'normalize.css'
import './assets/css/index.less'

// 导入路由和vuex
import router from './router'
import store from './store'
import { setupStore } from './store'

// 导入element plus
import { registerApp } from './global'

// 导入自定义全局组件
import PageContent from './components/page-content'
import PageSearch from './components/page-search'
import PageModal from './components/page-modal'

// 注册vue实例
const app = createApp(App)

// 挂载路由和vuex
setupStore()
app.use(store)
app.use(router)

// 把element plus注册成全局组件
registerApp(app)

// 挂载自定义全局组件
app.component('PageContent', PageContent)
app.component('PageSearch', PageSearch)
app.component('PageModal', PageModal)

// 挂载vue实例
app.mount('#app')
